package com.cskaoyan.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;

/**
 * @author stone
 * @date 2022/05/03 17:39
 * 如果扫描包范围为com.cskaoyan → Controller组件被两个配置都扫描了
 * 可以通过排除的方式 → 只让他扫描一次
 * 这里扫描到@Controller注解的时候排除掉
 */
@Configuration
@ComponentScan(value = "com.cskaoyan",
        //excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION,classes = Controller.class))
        //excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION,value = Controller.class))
        //excludeFilters = @ComponentScan.Filter(value = Controller.class))
        excludeFilters = @ComponentScan.Filter(Controller.class))
public class SpringConfiguration {
}
